package com.example.springboot1012.mysqlclass;

import com.example.springboot1012.mysqlclass.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class UserServerimpl implements UserServer {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        List<User> users = userMapper.getUserList();
        return  users;
    }

    @Override
    public String addUser(User user) {
        int i = userMapper.AddUser(user);
        return "添加成功" + i + "条数据";
    }
}
